package com.ekuaitu.kuaitustaff.utils.ble;

import java.util.UUID;

/**
 * Created by michaelpi on 2018/1/25.
 */

public class BleConstants {

    public static class ZhiXingTong {
        public static final String writeServiceUUID = "ffe5";
        public static final String writeCharacteristicUUID = "ffe9";
        public static final String readServiceUUID = "ffe0";
        public static final String readCharacteristicUUID = "ffe4";
    }


    public static class YunChe {
        static final UUID readServerUUID = UUID.fromString("2f2dfff0-2e85-649d-3545-3586428f5da3");
        static final UUID writeServerUUID = UUID.fromString("2f2dfff0-2e85-649d-3545-3586428f5da3");
        static final UUID readDataUUID = UUID.fromString("2f2dfff4-2e85-649d-3545-3586428f5da3");
        static final UUID writeDataUUID = UUID.fromString("2f2dfff5-2e85-649d-3545-3586428f5da3");
    }

    public static class BoShiJie {
        static final UUID readServerUUID = UUID.fromString("0000fee7-0000-1000-8000-00805f9b34fb");
        static final UUID writeServerUUID = UUID.fromString("0000fee7-0000-1000-8000-00805f9b34fb");
        static final UUID readDataUUID = UUID.fromString("000036f6-0000-1000-8000-00805f9b34fb");
        static final UUID writeDataUUID = UUID.fromString("000036f5-0000-1000-8000-00805f9b34fb");
    }

    /**
     * 车辆类型
     */
    public enum CarType {
        ZHI_XIN_TONG("zhixintong"),   //智信通
        YUN_CHE("yunche"),        //云车智慧
        BO_SHI_JIE("boshijie");   //博实结

        private String carName;

        CarType(String carName) {
            this.carName = carName;
        }

        public String getCarName() {
            return carName;
        }

    }

    /**
     * 车辆操作
     */
    public enum OperateType {
        OPEN_DOOR_POWER("openPowerOn"),
        CLOSE_DOOR_POWER("closePowerDown"),
        GET_STATUS("getStatus");

        private String typeName;

        OperateType(String typeName) {
            this.typeName = typeName;
        }

        public String getTypeName() {
            return typeName;
        }
    }

    /**
     * 发送数据的类型,用于判断发送的哪个指令超时
     */
    public enum StepName {
        NO_RESPONSE_CMD("无需响应"),//普通无需响应的命令
        APPLY_PSW("申请验证密码"),      //申请验证密码命令
        VERIFY_PSW("验证密码"),     //验证密码
        APPLY_CONTROL("申请控制"),  //申请控制命令
        GET_TOKEN("获取token"),     //博实结获取token
        OPEN("开门"),
        CLOSE("关门"),
        BEEP("寻车"),
        ADD_OIL("通油电"),
        CLOSE_OIL("断油电"),
        STATUS("车态"),
        MILLAGE("里程");

        private String typeName;

        StepName(String typeName) {
            this.typeName = typeName;
        }

        public String getTypeName() {
            return typeName;
        }
    }


    /**
     * 车辆状态类型
     */
    public static class CarStatus {
        public static final int FL_DOOR = 0; //左前门
        public static final int FR_DOOR = 1;//右前门
        public static final int RL_DOOR = 2;//左后门
        public static final int RR_DOOR = 3;//右后门
        public static final int TRUNK = 4;//后备箱
        public static final int FL_WINDOWS = 5;//左前窗
        public static final int FR_WINDOWS = 6;//右前窗
        public static final int RL_WINDOWS = 7;//左后窗
        public static final int RR_WINDOWS = 8;//右后窗
        public static final int ENGINE = 9;//发动机
        public static final int LIGHT = 10;//灯光
        public static final int MILEAGE = 11;//公里 KM
    }

}
